import request from '@/utils/request'
// 抽取出来方便后面使用
const apiUrl = '/admin/product/categoryBrand'
//  根据分类查询品牌
export const FindBrandByCategoryId=(categoryId)=>{
    return request({
        url: `/admin/product/brand/selectBrandByCategoryId/${categoryId}`,
        method: 'get',
    })
}

export const getCategoryBrandByPageAndQueryDto=(page,limit,queryDto)=>{
    return request({
        url: `${apiUrl}/${page}/${limit}`,
        method: 'get',
        params: queryDto
    })
}
//新增分类品牌
export const savaCategoryBrand=(data)=>{
    return request({
        url: `${apiUrl}/sava`,
        method: 'post',
        data
    })
}
//修改分类品牌
export const editCategoryBrand=(data)=>{
    return request({
        url: `${apiUrl}/edit`,
        method: 'put',
        data
    })
}

//删除分类品牌
export const deleteCategoryBrand=(id)=>{
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
}